<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a4j="http://richfaces.org/a4j">           


<ui:composition template="/resources/jsf/component/include/default.xhtml">
    
    <ui:define name="head">
        <ui:include src="/resources/jsf/component/composition/system/css/default.xhtml" />
    </ui:define>
    
    <ui:define name="left-content" />

    <ui:define name="content">
        <h:form id="form_result">
            <h:panelGroup rendered="#{not empty searchc.products}" >
                <h:dataTable value="#{searchc.products}" var="p">
                    <h:column>
                        <f:facet name="header">Produto</f:facet>
                        <h:commandLink action="#{searchc.view(p)}">
                            <h:outputText value="#{p.name}" />
                        </h:commandLink> 
                    </h:column>
                </h:dataTable>
            </h:panelGroup>
        </h:form>
                                      
        <h:panelGroup rendered="#{empty searchc.products}" >
            <h:panelGrid columns="2">
                <h:graphicImage name="not_found.png" library="image"/>
            	<p>Nenhum resultado encontrado</p>
            </h:panelGrid>
        </h:panelGroup>
    </ui:define> 
        
    <ui:define name="right-content" />

</ui:composition>
</html>